Focusing apparatus

ABSTRACT

A focusing apparatus including a focus signal detection circuit that generates a focus signal indicating the degree of focusing, an in-focus direction decision circuit that generates an in-focus direction signal indicating whether a focusing lens moved for focusing is on a far side or near side viewed from the in-focus position using the generated focus signal at predetermined time intervals, in-focus direction memory for storing the in-focus direction signal generated at predetermined time intervals, and a lens control amount calculation circuit and an in-focus vicinity decision circuit that controls the movement of the focusing lens based on a stored immediately preceding predetermined number of in-focus direction signals according to a predetermined rule.

THIS APPLICATION IS A U.S. NATIONAL PHASE OF PCT INTERNATIONALAPPLICATION PCT/JP03/09846. TECHNICAL FIELD

The present invention relates to a focusing apparatus, focusing method,program and recording medium which automatically adjusts an object imageto be taken by an image pickup apparatus such as a video camera anddigital still camera to an optimal focal position.

BACKGROUND ART

For an image pickup apparatus such as a video camera and digital stillcamera, an auto focusing function is one of the important functions forimproving operability. One of typical methods of realizing the functionis called “hill-climbing method.” This method extracts a medium/highfrequency component from an image signal obtained by image taking andcontrols the lens position so that the level becomes a maximum. Thissystem is based on the principle that a circle of confusion increases asthe lens goes away from a focal position and the contrast of the objectimage formed through the lens decreases as it goes away from the focalposition. The medium/high frequency component of the image signal is asignal that corresponds to the degree of the contrast of this objectimage.

This system is classified as a passive system, which requires nodedicated light-emitting apparatus as compared with an active systemsuch as an “infrared system,” . This system further has a feature ofbeing capable of high precision focusing because it receives littleinfluence from the distance from the object. Furthermore, since thehill-climbing method uses an image signal itself, it requires no otheroptical system which is required by another passive system called a“phase difference detection system.” For this reason, this systemprovides cost reduction and miniaturization.

On the other hand, this system leaves much to be desired in handlingobjects and scenes such as (1) objects with low contrast whose focussignal level relatively decreases, (2) scenes with a mixture of far andnear objects with a plurality of maximum points of a focus signal and(3) scenes under low illumination susceptible to noise in an imagesignal, etc.

A conventional configuration of a hill-climbing type auto focusingapparatus will be explained with reference to drawings.

FIG. 7 shows a configuration of a conventional auto focusing apparatus.

An image-taking lens 1 made up of a plurality of lenses including afocusing lens 1 a is position-controlled by a lens driving section 6(e.g., stepping motor and its driving circuit). An optical image of anobject is formed on an image pickup element 2 (e.g., CCD) which becomesimage pickup means through the image-taking lens 1.

An image pickup element 2 photoelectrically converts the formed objectimage and outputs it as a time-series signal. An image signal generationcircuit 3 applies various types of signal processing to the output ofthe image pickup element 2 and outputs a predetermined image signal CO(e.g., NTSC signal). Here, the various types of signal processing referto analog/digital conversion, gain control, γ correction, brightnesssignal generation processing, color-difference signal generationprocessing, etc., and further include aperture correction, noisereduction, etc., as required.

A focus signal detection circuit 4 integrates a brightness signal YE outof the time-series signal output from the image signal generationcircuit 3 using a low pass filter 41 (hereinafter referred to as “LPF”),removes the noise component and outputs a BP signal which has beendifferentiated by a high pass filter 42 (hereinafter referred to as“HPF”).

A peak detection circuit 43 converts this signal to an absolute value,detects a peak value (PK signal) of a signal corresponding to a presetarea (e.g., central 50% area of image-taking screen) in every horizontalscanning period and an addition circuit 44 further adds up these peakvalues for a vertical scanning period to generate a focus signal VF.This focus signal VF becomes a representative field value correspondingto the degree of the contract of the object image.

Here, FIG. 8 shows a schematic view illustrating an image of theoperation of the focus signal detection circuit 4 for detecting a focussignal VF from the image pickup screen. The same figure shows an exampleof an object having vertical stripes of “white, black, white.” FIG. 8(a) shows an out-of-focus state of the object and FIG. 8( b) shows anin-focus state of the object.

In FIG. 8( a), when the object is out of focus as shown in the firstillustration from the left, the signal level of the detection area 32which is a substantially central 50% area of the image-taking screen 31for a horizontal scanning period is detected and differentiated by theHPF 42 and the resulting BP signal is as shown in the secondillustration from the left. When this signal is converted to an absolutevalue by the peak detection circuit 43, the resulting signal is as shownin the third illustration from the left and the peak value (PK signal)at that time is output to the addition circuit 44. The fourthillustration from the left indicates the peak value by a fine line arrowand the length thereof indicates the magnitude of the peak value.Likewise, peak values in the detection area 32 are detected for everyhorizontal scanning period, and the addition circuit 44 adds up thosepeak values for a vertical scanning period to obtain a focus signal VF.The magnitude of the focus signal VF is indicated by a bold line arrowin the fourth illustration from the left. The length of this bold linearrow indicates the magnitude of the focus signal VF.

Then, in an in-focus state when the object is in focus as with the firstillustration from the left in FIG. 8 (b) a BP signal obtained bydetecting and differentiating the signal level of the detection area 32which is the substantially central 50% area on the image-taking screen31 for a horizontal scanning period by the HPF 42 is as shown in thesecond illustration from the left. When the peak detection circuit 43converts this signal to an absolute value, the resulting signal is asshown in the third illustration from the left and the peak value (PKsignal) at that moment is output to the addition circuit 44. The fourthillustration from the left indicates the peak value using a fine linearrow and the length thereof indicates the magnitude of the peak value.Likewise, peak values in the detection area 32 are detected for everyhorizontal scanning period, and the addition circuit 44 adds up thosepeak values for a vertical scanning period to obtain a focus signal VF.The magnitude of the focus signal VF is indicated by a bold line arrowin the fourth illustration from the left. The length of this bold linearrow indicates the magnitude of the focus signal VF.

Thus, there is a difference in the signal level detected by the HPF 42between the out-of-focus state and in-focus state and a focus signalresulting from the addition of peak values of this signal naturally hasa difference. As shown in this figure, the focus signal VF in thein-focus state is greater than that in the out-of-focus state.

Returning to FIG. 7, the lens control circuit 5 generates a variationcomponent ΔVF by calculating a difference between this focus signal VFand a past focus signal, for example, a focus signal obtained one fieldahead by a differential circuit 501. Seeing the sign of this variationcomponent ΔVF, an in-focus direction decision circuit 502 decideswhether the in-focus direction is on a far side or near side relative tothe actual point or whether it is the same as or opposite to theimmediately preceding moving direction. A lens control amountcalculation circuit 503 adds a predetermined amount of movement to thismoving direction and outputs the result as an amount of lens control tothe lens driving section 6. The lens driving section 6 drives thefocusing lens 1 a based on this amount of control. Focusing isautomatically performed by these configurations and operations.

Here, the amount of lens movement at the lens control amount calculationcircuit 503 in the lens control circuit 5 will be explained in moredetail.

When the amount of movement of the focusing lens 1 a is increased, themoving speed of the focusing lens 1 a increases. However, when themoving speed is too high, the stepping motor cannot keep track of thecorrelation between the amount of lens control and the moving position,possibly causing a so-called out-of-synchronization phenomenon. Inaddition, when the amount of movement of the focusing lens 1 a is toolarge, a hunting phenomenon in which the lens moves back and forth agreat deal around the in-focus position becomes noticeable, considerablydeteriorating the quality of the image. On the contrary, when the amountof movement is too small, it takes quite a long time to reach thein-focus position, deteriorating responsivity.

Therefore, a method of deciding the amount of lens movement according tothe level of the focus signal VF is considered. FIG. 9 shows ahill-climbing curve of a focus signal VF which changes depending on theobject. In FIG. 9, the X-axis shows the lens position of the focusinglens 1 a and shows the focal position substantially at the center. TheY-axis shows the level of the focus signal VF. The characteristic of anobject A shows a characteristic when the image-taking condition is good(when contrast and illumination are sufficient) , while thecharacteristic of an object B shows a state in which the image-takingcondition of the object is bad (low contrast, low illumination, etc.).LEV1 and LEV2 show threshold levels and MV1 to MV3 show amounts ofmovement of the lens. For example, as shown in FIG. 9, the thresholdlevel LEV1 and threshold level LEV2 (LEV2>LEV1) are specifiedbeforehand, and if the relationship between the threshold level LEV1,threshold level LEV2 and focus signal VF is VF<LEV1, then the amount ofmovement is assumed to be MV1 and if LEV1≦VF<LEV2, the amount ofmovement is assumed to be MV2 and if LEV2≦VF, the amount of movement isassumed to be MV3. Here, suppose the relationship between the amounts ofmovements MV1 to MV3 is MV1>MV2>MV3. FIG. 9 indicates the amount ofmovement of MV1 to MV3 by the length of the arrow.

In FIG. 9, in the case of the object A, for example, when the lensposition is P1, the focus signal VF is less than LEV1, and therefore thelens moves to the in-focus position by the amount of movement MV1. Whenthe lens moves to the in-focus position and the level of the focussignal VF increases and exceeds LEV1 (the lens position at this time isP2), the lens moves to the in-focus position by replacing the amount ofmovement MV1 by MV2 which is a smaller amount of movement than MV1.Furthermore, when the level of the focus signal VF exceeds LEV2 (thelens position at this time is P3) , the lens moves by replacing MV2 byMV3 which is a smaller amount of movement than MV2. Then, when the lensis moved to P4 past the in-focus position, the level of the focus signalVF is decreased, and therefore the lens is moved backward and the lensis brought closer to the in-focus position. The position where the levelof the focus signal VF reaches the highest point is the in-focusposition. Thus, changing the amount of movement of the focusing lens 1 aaccording to the level of the focus signal VF solves the above describedproblem.

However, the level of the focus signal VF varies depending on thecondition (contrast and illumination, etc.) of the object even when thedistance from the object is the same. Therefore, as with the object B inFIG. 9, for example, even if the focusing lens 1 a is near the in-focusposition, the amount of movement becomes MV2 which is greater than MV3and the quality of the image (moving image) may be damaged by hunting.

Furthermore, when a high resolution still image is taken by a stillimage taking function of a digital still camera or video camera, it ispreferable from the standpoint of resolution, etc., that the objectimage taken when the shutter is released be an object image exposed tolight while the lens is stopped. Furthermore, as the number of pixels ofthe still image increases, higher resolution is required, and thereforehigher in-focus accuracy is required.

FIG. 10 is a schematic view of the behavior of the lens movement in thecase of the object B shown in FIG. 9 and the horizontal axis shows thetime until the lens is stopped and the vertical axis shows the lensposition. In the conventional configuration, the accuracy of stopping ofthe lens strongly depends on the predetermined amount of lens movement(MV1 to MV3) and it is not possible to reduce the amount of movement forthe same reason as that of a moving image, and therefore the accuracy ofstopping may deteriorate and the quality (especially resolution) of thestill image may deteriorate.

In the conventional configuration, the lens is stopped after apredetermined time.

DISCLOSURE OF THE INVENTION

A possible measure against low contrast objects or scenes under lowillumination is a method of extracting a medium/high frequency componentfrom an image signal as two types of focus signals in differentfrequency bands and selectively using those signals as signals of ahill-climbing operation by judging the situation of the object accordingto the signal level, etc.

Furthermore, a possible measure against scenes having a mixture of farand near objects is a method of limiting the detection area of a focussignal to part of the range of the screen and thereby avoiding the stateof a mixture of far and near objects. Furthermore. a possible measureagainst noise is a method of specifying a noise level based on a focussignal beforehand when there is no contrast. moving the lens more whenthe focus signal is equal to or below the noise level or causing finevibration (hereinafter referred to as “wobbling”), extracting thevariation component of the focus signal and identifying the in-focusdirection.

As a method of improving focusing accuracy when taking a still image, itis possible to adopt a so-called “scanning system” which allowsdetection in two stages; when the release button is half depressed andwhen the release button is fully depressed and moves the lens to searchfor a maximum value of a focus signal when the release button in a half-depressed state, but in this case, a time lag is generated after theuser presses the release button until an object image is actually taken,and therefore the user may miss the right moment for releasing theshutter.

The present invention has been implemented in view of the abovedescribed conventional problems and it is an object of the presentinvention to provide a focusing apparatus, focusing method, program andrecording medium for reducing disturbance, etc., of an image caused byhunting and picking up a high-definition moving image and highresolution still image.

A first aspect is a focusing apparatus comprising:

focus signal generating means of generating a focus signal indicatingthe degree of focusing;

in-focus direction signal generating means of generating an in-focusdirection signal indicating whether a focusing lens moved for focusingis on a far side or near side viewed from an in-focus position usingsaid generated focus signal at predetermined time intervals;

in-focus direction signal storing means of storing said in-focusdirection signal generated at the predetermined time intervals; and

focusing lens movement controlling means of controlling movement of saidfocusing lens based on said stored immediately preceding predeterminednumber of in-focus direction signals according to a predetermined rule.

A second aspect is the focusing apparatus according to the first aspect,wherein said predetermined rule is a rule to reduce the speed ofmovement of said focusing lens as the difference between (1) the numberof in-focus direction signals, out of said stored immediately precedingpredetermined number of in-focus direction signals, indicating that saidmoved focusing lens is on the far side viewed from the in-focus positionand (2) the number of in-focus direction signals, out of said storedimmediately preceding predetermined number of in-focus directionsignals, indicating that said moved focusing lens is on the near sideviewed from the in-focus position, is decreased.

A third aspect is the focusing apparatus according to the second aspect,wherein the movement of said focusing lens is stopped (a) after apredetermined time has elapsed after said difference falls below apredetermined value or (b) after said difference falls below apredetermined value a predetermined number of times consecutively.

A fourth aspect is the focusing apparatus according to the third aspect,further comprising:

focus signal level data storing means of storing focus signal level dataon the focus signal level of a focus signal when said stored in-focusdirection signal is generated;

focusing lens position data storing means of storing focusing lensposition data on the position of said focusing lens where a focus signalhaving a focus signal level at which said focus signal level data isstored is generated; and

focusing lens position correcting means of correcting the position ofsaid focusing lens whose movement is stopped to the position of saidfocusing lens, of the positions of said focusing lens at which saidfocusing lens position data is stored, where a focus signal having amaximum focus signal level out of the focus signal levels at which saidfocus signal level data is stored is generated.

A fifth aspect is the focusing apparatus according to the third aspect,wherein only when the focus signal level of said generated focus signalis equal to or higher than a predetermined value, the movement of saidfocusing lens is controlled based on said stored immediately precedingpredetermined number of in-focus direction signals according to saidpredetermined rule.

A sixth aspect is the focusing apparatus according to the third aspect,further comprising focusing lens position detecting means of detectingthe position of said moved focusing lens,

wherein the movement of said focusing lens is controlled consideringsaid detected position of the focusing lens.

A seventh aspect is a focusing method comprising:

a focus signal generating step of generating a focus signal indicatingthe degree of focusing;

an in-focus direction signal generating step of generating an in-focusdirection signal indicating whether a focusing lens moved for focusingis on a far side or near side viewed from an in-focus position usingsaid generated focus signal at predetermined time intervals;

an in-focus direction signal storing step of storing said in-focusdirection signal generated at the predetermined time intervals; and

a focusing lens movement controlling step of controlling movement ofsaid focusing lens based on said stored immediately precedingpredetermined number of in-focus direction signals according to apredetermined rule.

An eighth aspect is a program for causing a computer to execute thefocusing method according to the seventh aspect comprising a focussignal generating step of generating a focus signal indicating thedegree of focusing, an in-focus direction signal generating step ofgenerating an in-focus direction signal indicating whether a focusinglens moved for focusing is on a far side or near side viewed from anin-focus position using said generated focus signal at predeterminedtime intervals, an in-focus direction signal storing step of storingsaid in-focus direction signal generated at the predetermined timeintervals, and a focusing lens movement controlling step of controllingmovement of said focusing lens based on said stored immediatelypreceding predetermined number of in-focus direction signals accordingto a predetermined rule.

A ninth aspect is a recording medium that stores the program accordingto the eighth aspect and can be processed by a computer.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a configuration of an auto focusingapparatus according to Embodiment 1 of the present invention;

FIG. 2 is an image of a hill-climbing operation through control of anamount of lens movement according to Embodiment 1 of the presentinvention;

FIG. 3 is a schematic view of the behavior of a lens 1 a according tothe embodiment of the present invention in the case of an object B ofEmbodiment 1 of the present invention;

FIG. 4 is a block diagram showing a configuration of an auto focusingapparatus according to Embodiment 2 of the present invention;

FIG. 5 is a block diagram showing a configuration of an auto focusingapparatus according to Embodiment 3 of the present invention;

FIG. 6 is a schematic view of the behavior of a lens 1 a according toEmbodiment 3 of the present invention;

FIG. 7 is a block diagram showing a configuration of a conventional autofocusing apparatus;

FIG. 8( a) is a schematic view (No. 1) of a conventional focus signaldetection operation;

FIG. 8( b) is a schematic view (No. 2) of a conventional focus signaldetection operation;

FIG. 9 is a schematic view of a hill-climbing operation throughconventional lens movement amount control; and

FIG. 10 is a schematic view of the lens 1 a in the case of aconventional object B.

DESCRIPTION OF SYMBOLS

-   1 Image-taking lens-   1 a Focusing lens-   2 Image pickup section-   3 Image signal generation circuit-   4 Focus signal detection circuit-   5 Lens control circuit-   502 In-focus direction decision circuit-   503 Lens control amount calculation circuit-   504 In-focus direction memory-   505 In-focus vicinity decision circuit-   506 In-focus vicinity data memory-   6 Lens driving section

BEST MODE FOR CARRYING OUT THE INVENTION

With reference now to the attached drawings, embodiments of the presentinvention will be explained below.

EMBODIMENT 1

First, a configuration of an auto focusing apparatus of this embodimentwill be explained mainly with reference to FIG. 1.

FIG. 1 is a block diagram showing a configuration of an auto focusingapparatus according to the Embodiment 1 of the present invention.

In FIG. 1, parts having the same configuration and function as those inthe conventional auto focusing apparatus already explained (see FIG. 7)are assigned the same reference numerals.

As will be explained in detail below, an in-focus direction memory 504and an in-focus vicinity decision circuit 505 are the means ofperforming important functions in this embodiment which are notavailable in the conventional auto focusing apparatus.

Reference numeral 1 denotes an image-taking lens made up of a pluralityof lens units, which consists of a zoom lens, focus lens, etc., placedon the optical axis. Reference numeral 1 a denotes a focusing lens whichforms part of the image-taking lens 1 (in the present Specification, thefocusing lens may be simply referred to as a “lens”) and moving it inthe direction of the optical axis can realize focusing.

Reference numeral 2 denotes an image pickup element which is the imagepickup means that forms an image of an optical signal of an object whichenters through the image-taking lens 1, converts it to an electricalsignal and outputs it as a time-series signal and consists of a solidimage pickup element such as a CCD (Charge Coupled Device).

Reference numeral 3 denotes an image signal generation circuit which isthe image signal generating means that applies various types of signalprocessing to the output signal from the image pickup element 2 and thevarious types of signal processing refer to analog/digital conversion,gain control, γ correction, brightness signal generation processing,color-difference signal generation processing, etc., and also applyaperture correction, noise reduction, etc., as required.

Reference numeral 4 denotes a focus signal detection circuit which isthe focus signal detecting means and consists of a low pass filter(hereinafter referred to as “LPF”) 41, a high pass filter (hereinafterreferred to as “HPF”) , a peak detection circuit 43 and an additioncircuit 44. The LPF 41 integrates a brightness signal of the time-seriessignal output from the image signal generation circuit 3 and removes anoise component. The HPF 42 outputs a BP signal which is the outputobtained by differentiating the output signal from the LPF 41. The peakdetection circuit 43 converts the signal from the HPF 42 to an absolutevalue and detects a peak value (PK signal) of the signal correspondingto a preset area (e.g., central 50% of the image-taking screen) forevery horizontal scanning period. The addition circuit 44 adds up thepeak values of the signal from the peak detection circuit 43 for avertical scanning period and generates a focus signal VF.

Reference numeral 5 denotes a lens control circuit which is the lenscontrolling means and generates a variation component AVF by calculatinga difference between this focus signal VF and a past focus signal, forexample, a focus signal obtained one field ahead by a differentialcircuit 501 which is the differential means. An in-focus directiondecision circuit 502 which is the in-focus direction deciding meansdecides whether the in-focus direction is on a far side or near siderelative to the actual point or whether it is the same as or opposite tothe immediately preceding moving direction by seeing the sign of thisvariation component AVF. At this time, when the lens driving isaccompanied by a wobbling operation to decide the direction, if thewobbling frequency is 30 Hz, two fields correspond to one-cyclevibration, and therefore after calculating a difference from the focussignal obtained one field ahead, the sign is inverted alternately foreach field and used to decide the in-focus direction. In deciding thedirection, when the sign is positive, the far side is decided to be thein-focus direction and when the sign is negative, the near side isdecided to be the in-focus direction.

The in-focus direction memory 504 stores a plurality of (e.g., 20)in-focus direction signals resulting from the decision at the in-focusdirection decision circuit 502 in the time-series order. When the numberof signals exceeds 20, data is overwritten starting from the oldestdata, and thereby the latest 20 data pieces are always stored.

An in-focus vicinity decision circuit 505 which is the in-focus vicinitydeciding means evaluates these 20 in-focus direction data pieces anddecides whether the in-focus position is close or not. As the decisionmethod, for example, 20 data pieces are counted direction by directionand when data in each direction is a predetermined threshold value(e.g., 5 or more data pieces on the far side and 5 or more data pieceson the near side) ,the lens is decided to be close to the in-focusposition.

A lens control amount calculation circuit 503 which is the lens controlamount calculating means decides the moving direction of the lens 1 afrom the result obtained by the in-focus direction decision circuit 502,decides an amount of lens movement from the level of the focus signal VFand the result of the in-focus vicinity decision circuit 505 and outputsthe amount of lens movement to a lens driving section 6. The lensdriving section 6 is driven by this amount of control and moves thefocusing lens 1 a. Focusing is automatically performed by theseconfigurations and operations.

In this way, it is possible to adaptively change the amount of movementof the lens 1 a according to whether the in-focus position is close ornot. The differential circuit 501, in-focus direction decision circuit502, lens control amount calculation circuit 503, in-focus directionmemory 504 and in-focus vicinity decision circuit 505 make up the lenscontrol circuit 5.

Then, the operation of the auto focusing apparatus of this embodimentwill be explained. While explaining the operation of the auto focusingapparatus of this embodiment, an embodiment of the focusing method ofthe present invention will also be explained (the same will apply toother embodiments).

The image-taking lens 1 made up of a plurality of lenses including thefocusing lens 1 a is position-controlled by the lens driving section 6(e.g., linear motor and its driving circuit).

An optical image of an object is formed on the image pickup element 2(e.g., CCD) which becomes the image pickup means through theimage-taking lens 1. The image pickup element 2 photoelectricallyconverts the object image formed and outputs it as a time-series signal.The image signal generation circuit 3 applies various types of signalprocessing to the output of the image pickup element 2 and outputs apredetermined image signal CO (e.g., NTSC signal). Here, the varioustypes of signal processing refer to analog/digital conversion, gaincontrol, γ correction, brightness signal generation processing,color-difference signal generation processing, etc., and furtherincludes aperture correction, noise reduction, etc., as required.

The focus signal detection circuit 4 integrates a brightness signal YEout of the time-series signals output from the image signal generationcircuit 3 using the LPF 41, removes the noise component and then outputsa BP signal which has been differentiated by the HPF 42. The peakdetection circuit 43 converts this signal to an absolute value, detectsa peak value of a signal corresponding to a preset area (e.g., central50% area of image-taking screen) in every horizontal scanning period,the addition circuit 44 further adds up these peak values (PK signals)for a vertical scanning period to generate a focus signal VF. This focussignal VF becomes a representative value corresponding to the degree ofthe contract of the object image and is input to the lens controlcircuit 5.

Here, how to decide an amount of lens movement at the lens controlamount calculation circuit 503 in the lens control circuit 5 will beexplained in detail.

As a method of deciding the amount of movement of the lens 1 a based onthe focus signal VF, for example, a threshold level LEV1 and thresholdlevel LEV2 (LEV2>LEV1) are specified beforehand, and if VF<LEV1, theamount of movement is assumed to be MV1, if LEV1≦VF<LEV2, the amount ofmovement is assumed to be MV2 and if LEV2≦VF, the amount of movement isassumed to be MV3. Furthermore, when the in-focus vicinity decisioncircuit 505 decides that the in-focus position is close, the amount ofmovement is assumed to be MV4. Here, suppose the relationship betweenamounts of movement MV1, MV2, MV3 and MV4 is MV1>MV2>MV3>MV4. MV4 isassumed to be, for example, a minimum unit amount.

Then, the relationship between the focus signal VF and movement of thelens will be explained using FIG. 2.

In FIG. 2, the X-axis shows the lens position of the focusing lens 1 aand shows the focal position substantially at the center. The Y-axisshows the level of the focus signal VF. The characteristic of an objectA shows a characteristic when the image-taking condition is good (whencontrast and illumination are sufficient), while the characteristic ofan object B shows a state in which the image-taking condition of theobject is bad (low contrast, low illumination, etc.) LEV1 and LEV2 showthreshold levels and MV1 to MV4 show amounts of movement of the lens.The amount of movement of MV1 to MV4 is expressed by the length of thearrow.

In FIG. 2, in the case of the object A, for example, when the lensposition is P1, the focus signal VF is less than LEV1, and therefore thelens 1 a moves to the in-focus position by the amount of movement MV1.When the lens 1 a moves to the in-focus position and the level of thefocus signal VF increases and exceeds LEV1 (the lens position at thistime is P2) , the lens moves to the in-focus position by replacing MV1by MV2 which is a smaller amount of movement than MV1. Furthermore, whenthe level of the focus signal VF exceeds LEV2 (the lens position at thistime is P3) , the lens moves by replacing MV2 by MV3 which is a smalleramount of movement than MV2. Then, when the lens reaches the position ofP4, the in-focus vicinity decision circuit 505 decides that the actuallens position is close to the in-focus position and changes the amountof movement to MV4 which is smaller than MV3. The method of deciding thevicinity of the in-focus position will be described later using FIG. 3.Then, when the lens 1 a is moved by the amount of movement of MV4 andthe lens 1 a is moved to P5 past the in-focus position, the level of thefocus signal VF decreases and therefore the lens 1 a is moved backwardand the lens 1 a is brought closer to the in-focus position. Theposition where the level of the focus signal VF reaches the highestpoint is the in-focus position.

Then, in the case of the object B, when the lens position is Q1, thefocus signal VF is less than LEV1, and therefore the lens 1 a moves tothe in-focus position by an amount of movement MV1. The lens 1 a movesto the in-focus position and when the level of the focus signal VFincreases and exceeds LEV1 (the lens position at this time is Q2) , thelens moves to the in-focus position by replacing the amount of movementMV1 by MV2 which is an amount of movement smaller than MV1. When thelens position reaches Q3, the in-focus vicinity decision circuit 505decides that the current lens position is close to the in-focus positionand changes the amount of movement from MV2 to MV4. The method ofdeciding the vicinity of the in-focus position will be described laterusing FIG. 3. Then, when the lens 1 a is moved by an amount of movementof MV4 and the lens 1 a is moved to Q4 past the in-focus position, thelevel of the focus signal VF is decreased, and therefore the lens 1 a ismoved backward and brought closer to the in-focus position. The positionwhere the level of the focus signal VF reaches the highest point is thein-focus position.

Thus, according to this embodiment, the amount of movement of the lens 1a becomes a minimum in the vicinity of the in-focus positionindependently of the object, and therefore it is possible to minimizedisturbance of the image by hunting.

Furthermore, when MV4 is set to 0, the lens 1 a is immediately stoppedwhen it comes close to the in-focus position, and therefore it ispossible to provide a stable image free of hunting.

Furthermore, providing an amount of movement MV4 for the vicinity of thein-focus position makes it possible to set larger values thanconventional values for MV1, MV2 and MV3. This makes it possible toincrease the moving speed of the lens 1 a at positions not close to thein-focus position and improve responsivity.

Furthermore, when hill-climbing control accompanied by a wobblingoperation is performed, if the in-focus vicinity decision result showsthat the lens is close to the in-focus position, it is still possible toreduce wobbling of the image close to the in-focus position by reducingthe amount of the wobbling amplitude.

Furthermore, if the lens is not in the vicinity of the in-focus positionthe amount of the wobbling amplitude can be set to a greater value thanthe conventional amount, and therefore it is easy to extract thevariation component of the focus signal and easy to decide the in-focusdirection. This makes it possible to achieve focusing with goodresponsivity even with conventional scenes and objects under lowillumination and with low contrast which the hill-climbing method is notgood at handling.

The amount of the wobbling amplitude is added to the amount of lensmovement and output to the lens driving section 6 as the amount of lenscontrol.

Then, details of the process in which the in-focus vicinity decisioncircuit 505 decides that the lens position is close to the in-focusposition will be explained together with the behavior of the lens 1 ausing FIG. 3 and using the object B in FIG. 2 as an example.

In FIG. 3, the X-axis shows a time and the Y-axis shows the lensposition. When the operation is explained chronologically, the lens 1 ais moved to the in-focus position by an amount of movement MV1 first.Since the in-focus direction at this time is a positive direction afterthe movement is started, the sign is positive (+direction). Therefore,the number of signs recorded in the in-focus direction memory 504 isalso 20 “+”'s and 0 “−”s.

Then, when the focus signal VF exceeds LEV1, the amount of movementchanges from MV1 to MV2, and when the lens 1 a further continues to moveand exceeds the in-focus position, the in-focus direction becomes anegative direction, and therefore “−” signs are output from the in-focusdirection decision circuit 502. The in-focus direction memory 504 storesthe − signs and when four − signs are stored, the lens 1 a passesthrough the in-focus position again. Then, the sign output from thein-focus direction decision circuit 502 becomes + again, and the numberof + signs is added.

By repeating such an operation, when five − signs are stored in thein-focus direction memory 504, it is decided that the lens 1 a hasreached close to the in-focus position and the amount of movement ischanged from MV2 to MV4. Then, the lens 1 a is moved to the in-focusposition by an amount of movement of MV4.

The lens control amount calculation circuit 503 stops the operation attiming (Z2 in FIG. 3) which is a predetermined time after timing (Z1 inFIG. 3) at which the in-focus vicinity decision circuit 505 decided thatthe lens was close to the in-focus position irrespective of the lensposition of the focusing lens 1 a.

Of course, in the in-focus state when the lens 1 a is stopped, the lensposition may be stopped slightly deviated from the in-focus position,but the amount of lens movement immediately before the lens is stoppedis extremely small. For this reason, the focusing lens 1 a can bestopped at a position extremely close to the in-focus position, andtherefore the image may be slightly out of focus, but this is such asmall level that presents no problem in terms of quality.

As shown above, according to this embodiment, since the lens 1 a ismoved by MV1 which is the largest amount of movement at a position notclose to the in-focus position, it is possible to increase the speed ofthe lens 1 a and the lens is moved close to the in-focus position by MV4which is a small amount of movement, and therefore it is possible torealize control so as to move the lens slowly (delicately), which makesit possible to realize performance with total responsivity, stability,accuracy and high quality.

Moreover, since a moving image and a still image are taken according todifferent image-taking styles and also require different accuracylevels, it is possible to provide different amounts of movement betweena moving image and still image and customize the balance of focusingperformance to their respective optimum states.

The number of data pieces stored in the in-focus direction memory 504 isnot limited to the above described value (20). If that number is smallerthan 20, the memory scale can be reduced. On the contrary, increasingthis number increases the amount of movement MV2 and amount of movementMV3, causes them to be wobbled across the in-focus position and has theadvantage of being able to stably decide whether the lens is in thevicinity of the in-focus position even if the period for deciding thedirection extends.

Furthermore, the threshold values used in the in-focus vicinity decisioncircuit 505 are not fixed to the above values (5 or more values in eachdirection). For example, if the number of threshold values is greaterthan 5, it is possible to reduce influences of noise and it is also easyto absorb differences in the period of an in-focus decision signal dueto a difference in contrast of the object, which increases the accuracyof in-focus decision. On the contrary, reducing the number of thresholdvalues improves the speed of in-focus vicinity decision leading toimprovement of responsivity.

In short, it is possible to control the movement of the focusing lens 1a so that the speed of movement of the focusing lens 1 a is reduced asthe difference between (1) the number of in-focus direction signalsindicating that the moved focusing lens 1 a out of a stored immediatelypreceding predetermined number of in-focus direction signals is on thefar side viewed from the in-focus position and (2) the number ofin-focus direction signals indicating that the moved focusing lens 1 aout of the stored immediately preceding predetermined number of in-focusdirection signals is on the near side viewed from the in-focus position,is decreased.

Furthermore, the lens 1 a is stopped at timing Z2 in FIG. 3 through thetime control from the in-focus vicinity decision timing Z1 to Z2, butwhen an in-focus state is achieved through wobbling such as when amoving image is taken, it is also possible to continue the wobblingoperation. However, when a still image is taken, performing a wobblingoperation when the lens is stopped causes quality deterioration tobecome noticeable, and therefore the wobbling operation is stopped.

Furthermore, the period control from the in-focus vicinity decisiontiming Z1 to lens stop timing Z2 is done through time control, but it isalso possible to perform memory count control such that the lens stoptiming is determined when focus signals with at least a predeterminednumber (5 in this embodiment) of “+”s and “−”s are stored in thein-focus direction memory 504 from the in-focus vicinity decision timingZ1 onward a predetermined number of times consecutively.

In short, the focusing lens 1 a can be stopped (a) after a predeterminedtime has elapsed after the aforementioned difference fell below apredetermined value or (b) after the aforementioned difference fallsbelow a predetermined value a predetermined number of timesconsecutively.

The focus signal generating means of the present invention correspondsto the focus signal detection circuit 4, the in-focus direction signalgenerating means of the present invention corresponds to the in-focusdirection decision circuit 502, the in-focus direction signal storingmeans of the present invention corresponds to the in-focus directionmemory 504 and the focusing lens movement controlling means of thepresent invention corresponds to the means including the lens controlamount calculation circuit 503 and the in-focus vicinity decisioncircuit 505.

EMBODIMENT 2

Then, mainly with reference to FIG. 4, a configuration and operation ofan auto focusing apparatus of this embodiment will be explained.

FIG. 4 illustrates a configuration of Embodiment 2 of the presentinvention.

As the overall configuration, this embodiment is different fromaforementioned Embodiment 1 in that it is provided with a lens positiondetection section 7 and a focus signal VF is also connected to anin-focus vicinity decision circuit 505. Explanations of the componentsassigned the same reference numerals will be omitted here.

Reference numeral 7 denotes a lens position detection section which isthe lens position detecting means and detects the current position ofthe lens on the optical axis of a focusing lens 1 a and is made up of,for example, an MR sensor (magnetic resistance element sensor) and itsdetection circuit. The information of the current position of the lensdetected by the lens position detection section 7 is input to a lenscontrol amount calculation circuit 503.

The lens position detection section 7 detects the current lens positionand a lens control circuit 5 controls the next lens moving direction.and amount of movement while feeding back the current lens position.

Since lens position control is realized through feedback control, thepossibility of a so-called out-of-synchronization phenomenon is reducedand it is possible to perform faster and more accurate position controlof the lens 1 a. This configuration is more effective if the lensdriving section 6 is made up of a linear motor. That is, the linearmotor can be driven faster than a stepping motor, and therefore it ispossible to use a control method such that the lens control circuit 5performs hill-climbing control up to a maximum (maximal) value of afocus signal VF while continuously applying wobbling and detecting thein-focus direction.

An advantage of continuously applying wobbling is that it improvestrackability with respect to a movement of the object and variation in ascene and thereby improves responsivity drastically when an image-takingconfiguration is changed.

In such a configuration, the adaptive control of the amount of movementby in-focus vicinity decision of the present invention is extremelyeffective, improves responsivity, improves stability and increases theaccuracy, too.

Furthermore, a focus signal VF is also input to the in-focus vicinitydecision circuit in this embodiment. This improves the accuracy andreliability of in-focus vicinity decision. For example, when the focussignal is below a noise level, it is possible to decide that thein-focus direction decision result is considerably affected by noise andthat the reliability of the data is low, and thereby avoid making anyin-focus vicinity decision.

The focusing lens position detecting means of the present inventioncorresponds to the lens position detection section 7.

EMBODIMENT 3

Then, mainly with reference to FIG. 5, a configuration of an autofocusing apparatus of this embodiment will be explained.

FIG. 5 shows a configuration of Embodiment 3 of the present invention.

The overall configuration is different from aforementioned Embodiment 2in that it is provided with an in-focus vicinity data memory 506.Explanations of the components assigned the same reference numerals willbe omitted here.

Reference numeral 5 denotes a lens control circuit which is the lenscontrolling means, which is provided with a differential circuit 501, anin-focus direction decision circuit 502, a lens control amountcalculation circuit 503, an in-focus direction memory 504, an in-focusvicinity decision circuit 505 and the in-focus vicinity data memory 506.The lens control amount calculation circuit 503 calculates the movingdirection and amount of movement of a focusing lens 1 a based on theoutput of the in-focus direction decision circuit 502, the level of afocus signal VF, the result of the in-focus vicinity decision circuit505 and the data of the in-focus vicinity data memory 506 and outputsthe information, on the amount of lens control to the lens drivingsection 6. The in-focus vicinity data memory 506 stores not only thefocus signal VF but also the amount of lens control corresponding to aplurality of times of past lens movement (e.g., 20 times). This storeddata is also overwritten sequentially starting from the oldest data aswith the focus signal in such a way that data corresponding to thelatest 20 times of lens movement is always stored.

Then, the operation of the auto focusing apparatus of this embodimentwill be explained.

An image-taking lens 1 made up of a plurality of lenses including thefocusing lens 1 a is position-controlled by a lens driving section 6(e.g., linear motor and its driving circuit). A lens position detectionsection 7 (e.g. MR sensor and its detection circuit) detects the currentposition of the lens on the optical axis of the focusing lens.

A focus signal detection circuit 4 integrates a brightness signal YE outof the time-series signal output from an image signal generation circuit3 using an LPF 41, removes the noise component and outputs a BP signalwhich has been differentiated by an HPF 42. A peak detection circuit 43converts this signal to an absolute value, detects a peak value of asignal corresponding to a preset area (e.g., central 50% area ofimage-taking screen) in every horizontal scanning period, an additioncircuit 44 further adds up these peak values (PK signals) for a verticalscanning period and generates a focus signal VF. This focus signal VFbecomes a representative value corresponding to the degree of thecontract of the object image. This focus signal VF corresponding to aplurality of times of storage in the past (e.g., 20 times) is stored inthe in-focus vicinity data memory 506 as the in-focus vicinity focussignal. This stored data is overwritten starting from the oldest data insuch a way that data corresponding to the latest 20 times of storage isalways stored.

Furthermore, the in-focus vicinity data memory 506 stores not only thefocus signal VF but also the amount of lens control (which will bedescribed later) from the lens control amount calculation circuit 503corresponding to a plurality of times of storage in the past (e.g. 20times). This stored data is also overwritten sequentially starting fromthe oldest data as with the focus signal in such a way that the datacorresponding to the latest 20 times of storage is always stored.

Here, it is necessary to chronologically associate the in-focus vicinityfocus signal stored in the in-focus vicinity data memory 506 with theamount of lens control in the vicinity of the in-focus position. As aspecific example, for instance, assuming that data is stored at timeintervals of 1 field and a time delay from the output timing of theamount of lens control of the lens control section 5 to the input timingfor the focus signal VF to the lens control section 5 is, for example, 2fields, timings are adjusted so that the recording timing for thein-focus vicinity data memory 506 is delayed by 2 fields with respect tothe input timing for the in-focus vicinity data memory 506. Because thisdelay corresponds to 2 data pieces, if data is recorded by shifting thememory address by 2, data is stored associated with the same address.

The lens control amount calculation circuit 503 calculates the movingdirection and amount of movement of the lens 1 a based on the output ofthe in-focus direction decision circuit 502, the level of the focussignal VF, the result of the in-focus vicinity decision circuit 505 andthe data of the in-focus vicinity data memory 506 and outputs the amountof control to the lens driving section 6.

When the in-focus vicinity decision circuit 505 does not decide that thelens is in the vicinity of the in-focus position, it does not use thedata of the in-focus vicinity data memory 506 and decides the movingdirection and amount of movement of the lens 1 a according to the outputresult of the in-focus direction decision circuit 502 and the level ofthe focus signal VF. Furthermore, when the in-focus vicinity decisioncircuit 505 decides that the lens is in the vicinity of the in-focusposition, it sees the data of the in-focus vicinity data memory 506 forthe period during which the lens is in the vicinity of the in-focusposition and regards the lens position when the level of the in-focusvicinity focus signal reaches a maximum value as the in-focus position.Then, when this lens 1 a is stopped, the in-focus vicinity decisioncircuit 505 decides the final moving direction and amount of movement ofthe lens 1 a using the amount of lens control in the vicinity of thein-focus position associated with the maximum value of this in-focusvicinity focus signal.

When the amount of movement of the lens 1 a is adaptively changedaccording to whether the lens is in the vicinity of the in-focusposition or not and the lens 1 a is stopped according to thisconfiguration and operation, it is possible to achieve accurate focusingby correcting the position of the lens 1 a using the amount of lenscontrol which takes the maximum value among the levels of past focussignals for the period during which the lens is in the vicinity of thein-focus position.

Of course, the position of the lens 1 a at which the level of the focussignal becomes a maximum can be calculated accurately using variousinterpolation calculations.

The position of the lens 1 a at which the level of the focus signalbecomes a maximum is believed to often exist close to the position ofthe lens 1 a where signs output from the in-focus direction decisioncircuit 502 as the in-focus direction signal changes.

Here, the relationship between the timing of stopping the lens 1 a andresponsivity and in-focus accuracy (lens stop variation) will beexplained.

The step interval of the amount of lens control in the vicinity of thein-focus position stored in the in-focus vicinity data memory depends onthe amount of movement of the lens 1 a at that time. Therefore, when thelens 1 a is stopped immediately after the in-focus vicinity decisioncircuit 505 decides that the lens is in the vicinity of the in-focusposition, responsivity is good, but with regard to the accuracy ofstopping of the lens 1 a, the amount of lens control in the vicinity ofthe in-focus position becomes the step interval specified by the amountof movement other than the amount of movement MV4.

In contrast to this, by reducing the amount of lens movement to MV4after the lens is decided to be in the vicinity of the in-focus positionand stopping the lens when a predetermined time (e.g., 20 fields) haselapsed, the step interval is reduced, the variation when the lens isstopped decreases and it is possible to achieve more accurate stoppingcontrol.

Then, with reference to FIG. 6, details of the process in which thein-focus vicinity decision circuit 505 decides that the lens position isin the vicinity of the in-focus position will be explained using theobject B in FIG. 2 as an example together with the behavior of the lens1 a.

In the schematic view of lens movement in FIG. 6, the X-axis shows atime and the Y-axis shows the lens position. The operation will beexplained chronologically using the figure. First, in FIG. 6, the lens 1a is moved to the in-focus position by an amount of movement MV1. Sincethe in-focus direction at this time is a positive direction after themovement is started, the sign is positive (+direction) as shown in FIG.6. Therefore, the number of signs recorded in the in-focus directionmemory 504 is also 20 “+”s and 0 “−”s. Then, when the focus signal VFexceeds LEV1, the amount of movement changes from MV1 to MV2, and whenthe lens 1 a further continues to move and exceeds the in-focusposition, the in-focus direction becomes a negative direction, andtherefore the in-focus direction decision circuit 502 outputs “−” signs.“−” signs are stored in the in-focus direction memory 504 and at thetiming at which four “−” signs are stored in the memory, the lens 1 apasses through the in-focus position again. Then, the signs output fromthe in-focus direction decision circuit 502 become + again and thenumber of + signs is added. This operation is repeated and when five −signs are stored in the in-focus direction memory 504, the lens 1 a isdecided to be close to the in-focus position and the amount of movementis changed from MV2 to MV4. Then, the lens 1 a is moved to the in-focusposition by an amount of movement of MV4.

Then, the lens control amount calculation circuit 503 tries to stop theoperation at timing (Z2 in FIG. 6) which is a predetermined time aftertiming (Z1 in FIG. 6) at which the in-focus vicinity decision circuit505 decides that the lens is close to the in-focus position irrespectiveof the lens position of the focusing lens 1 a. When the lens 1 a isstopped, the lens position when the level of the in-focus vicinity focussignal stored in the in-focus vicinity data memory 506 reaches a maximumvalue (when the lens 1 a passes through the in-focus position) isregarded as the in-focus position and it is possible to determine themoving direction and amount of movement of the lens 1 a using themaximum value of this in-focus vicinity focus signal and the associatedamount of lens control in the vicinity of the in-focus position andfinally stop the lens 1 a at the in-focus position.

By deciding whether the lens is in the vicinity of the in-focus positionor not through the above described configuration and operation andstopping the lens using the data in the vicinity of the in-focusposition, it is possible to improve responsivity in an area other thanthe vicinity of the in-focus position and improve the quality andaccuracy in the vicinity of the in-focus position.

Moreover, since a moving image and a still image are taken according todifferent image-taking styles and also require different accuracylevels, it is possible to provide different amounts of movement betweena moving image and still image and customize the balance of focusingperformance to their respective optimum states.

Furthermore, as described above, by deciding that for a period duringwhich the level of the focus signal VF does not exceed a predeterminedvalue, the in-focus direction data is affected by noise and has lowreliability and regarding the in-focus vicinity decision result asinvalid or stopping the in-focus vicinity decision itself and alwaysconsidering that the lens is not in the vicinity of the in-focusposition, it is possible to make an accurate in-focus vicinity decision.

The amount of lens control stored in the in-focus vicinity data memory506 need not be the data output to the lens driving means and it goeswithout saying that it is also possible to store the value correspondingto position information of the lens 1 a (e.g., target position andcurrent position) and convert the data to an amount of lens control.

Furthermore, this embodiment intends to improve responsivity andin-focus accuracy by providing a lens position detection circuit toperform position feedback control, but using, for example, a steppingmotor to perform open control can also achieve similar effects inimproving the accuracy and in this case the lens position detectioncircuit is no longer necessary and in this way it is possible to realizea cost reduction.

The focus signal level data storing means of the present inventioncorresponds to the in-focus vicinity data memory 506, the focusing lensposition data storing means of the present invention corresponds to thein-focus vicinity data memory 506 and the focusing lens positioncorrecting means of the present invention corresponds to the meansincluding the lens driving section 6 and lens control amount calculationcircuit 503.

As shown above, Embodiments 1 to 3 have been explained in detail.

The program of the present invention is a program to cause a computer toexecute all or some steps (or procedures, operations or actions, etc.)of the above described focusing method of the present invention and aprogram that operates in cooperation with the computer.

Furthermore, the recording medium of the present invention is arecording medium that stores a program to cause a computer to executeall or some operations of all or some steps (or procedures, operationsor actions, etc.) of the above described focusing method of the presentinvention and is also a computer-readable recording medium which allowsthe read program to execute the above described operations incooperation with the computer.

The above described term “some steps (or procedures, operations oractions, etc.)” of the present invention refers to one or several stepsout of those plurality of steps.

The above described term “operations of steps (or procedures, operationsor actions, etc.)” of the present invention refers to operations of allor some of the above described steps.

A mode of use of the program of the present invention can also be onewhich is recorded in a computer-readable recording medium and whichfunctions in cooperation with the computer.

A mode of use of the program of the present invention can also be onewhich is transmitted through a transmission medium, read by a computerand which operates in cooperation with the computer.

Furthermore, the above described computer of the present invention isnot limited to pure hardware such as a CPU, but can also includefirmware, OS or peripheral devices.

As described above, the configuration of the present invention may alsobe implemented by software or by hardware.

As described above, the above described configuration has made itpossible to decide whether the lens is in the vicinity of the in-focusposition or not with extremely high accuracy and adaptively change theamount of lens movement and thereby realize focusing with stability,high responsivity and high accuracy without causing any malfunctionunder wide object conditions and produce excellent autofocusing effects.

Providing such an auto focusing apparatus for a video camera or digitalstill camera makes it possible to obtain a moving image which is alwaysstable and a high quality still image with high resolution withoutmissing the right moment for releasing the shutter.

The present invention has advantages of being able to reducedisturbance, etc., of an image due to hunting and pick up a highdefinition moving image and high resolution still image.

1. A focusing apparatus comprising: focus signal generating means ofgenerating focus signals indicating the degree of focusing; in-focusdirection signal generating means of generating in-focus directionsignals indicating whether a focusing lens moved for focusing is on afar side or near side viewed from an in-focus position using saidgenerated focus signals at predetermined time intervals; in-focusdirection signal storing means of storing a plurality of said in-focusdirection signals generated at the predetermined time intervals; andfocusing lens movement controlling means of controlling movement of saidfocusing lens based on a predetermined plural number of immediatelypreceding in-focus direction signals out of said stored in-focusdirection signals according to a predetermined rule.
 2. The focusingapparatus according to claim 1, further comprising accumulation means ofaccumulating each of the stored in-focus direction signals, wherein saidpredetermined rule is a rule to reduce the speed of the movement of saidfocusing lens as the difference between (1) the number of in-focusdirection signals, out of said immediately preceding accumulatedin-focus direction signals, indicating that said moved focusing lens ison the far side viewed from the in-focus position and (2) the number ofin-focus direction signals, out of said immediately precedingaccumulated in-focus direction signals, indicating that said movedfocusing lens is on the near side viewed from the in-focus position, isdecreased.
 3. The focusing apparatus according to claim 2, wherein themovement of said focusing lens is stopped (a) after a predetermined timehas elapsed after the difference falls below a predetermined value or(b) after the difference falls below a predetermined value apredetermined number of times consecutively.
 4. The focusing apparatusaccording to claim 3, further comprising: focus signal level datastoring means of storing focus signal level data on the focus signallevels of said focus signals when said stored in-focus direction signalsare generated; focusing lens position data storing means of storingfocusing lens position data on the position of said focusing lens whenfocus signals having focus signal levels at which the focus signal leveldata are stored are generated; and focusing lens position correctingmeans of correcting the position of said focusing lens whose movement isstopped to the position of said focusing lens, of the positions of saidfocusing lens at which the focusing lens position data are stored, wherea focus signal having a maximum focus signal level out of the focussignal levels at which the focus signal level data are stored isgenerated.
 5. The focusing apparatus according to claim 3, wherein onlywhen the focus signal level of said generated focus signal is equal toor higher than a predetermined value, the movement of said focusing lensis controlled based on said immediately preceding in-focus directionsignals according to said predetermined rule.
 6. The focusing apparatusaccording to claim 3, further comprising focusing lens positiondetecting means of detecting the position of said moved focusing lens,wherein the movement of said focusing lens is controlled considering thedetected position of said focusing lens.
 7. A focusing methodcomprising: a focus signal generating step of generating focus signalsindicating the degree of focusing; an in-focus direction signalgenerating step of generating in-focus direction signals indicatingwhether a focusing lens moved for focusing is on a far side or near sideviewed from an in-focus position using said generated focus signals atpredetermined time intervals; an in-focus direction signal storing stepof storing a plurality of said in-focus direction signals generated atthe predetermined time intervals; and a focusing lens movementcontrolling step of controlling movement of said focusing lens based ona predetermined plural number of immediately preceding in-focusdirection signals out of said stored in-focus direction signalsaccording to a predetermined rule.